<?php

// +---------------------------------------------------
// | Name： 星空框架 新闻热点验证规则
// +---------------------------------------------------
// | Version： V5.0
// +---------------------------------------------------
// | Author: xkyinzhe <zhonghuaxinxing@sina.cn>
// +---------------------------------------------------
// | Time: 2021-04-22 09:07
// +---------------------------------------------------
declare(strict_types=1);

namespace app\common\validate;

use think\Validate;

/**
 * @xk 新闻热点验证规则
 */
class Artice extends Validate
{
    protected $rule = [
  'artice_id' => 'number|min:1',
  'title' => 'require|min:2|max:100',
  'order_id' => 'number|min:0',
  'status' => 'in:0,1',
  ];
    protected $message = [
  'artice_id' => '请选择需要操作的新闻热点',
  'title.require' => '请填写新闻标题',
  'order_id.number' => '请按照规则填写排序ID',
  'status' => '广告位状态不符合规则',
  ];
    protected $scene = [
  'create' => ['title', 'order_id', 'status'],
  'edit' => ['artice_id', 'title', 'order_id', 'status'],
  ];
}
